home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / os2 / pmgb202.zip / TEST.PMG < prev   
Text File  |  1992-09-23  |  1KB  |  33 lines

  1. /* Sample (test) startup macro */
  2. /* For example:  start pmglobe2 macro test  */
  3.  
  4. /* Get the information we need, and set a new title */
  5. 'extract version versionb'
  6. 'set title PMGlobe -' version '('versionb'-bit)'
  7.  
  8. /* Set up some sample timezones; summertime assumed same as local */
  9. bst=offset( 0)           /* argument is base GMT offset, in hours */
  10. est=offset(-5)
  11. pst=offset(-8)
  12. jst=offset(+9)
  13.  
  14. /* Mark some chosen cities, with a couple of clocks */
  15. 'set font default'
  16. "mark  51o30    0   clock" bst "label London"
  17. "mark  40.8   -74.0 clock" est "label New York"
  18. "mark  37.8  -122.4 x center    label San Francisco"
  19. "mark  35.7   139.8 clock" jst "label Tokyo"
  20. "mark -33.7   151.3             label Sydney"
  21.  
  22. exit
  23.  
  24.  
  25. /* OFFSET(seconds) -- convert winter GMT offset to current */
  26. /* Answer is returned in seconds */
  27. offset: procedure
  28.   arg hours .                             /* (Unchecked) */
  29.   'extract dayoffset'                     /* get local summertime offset */
  30.   if dayoffset='UNKNOWN' then dayoffset=0 /* just in case */
  31.   return hours*3600+dayoffset             /* convert to seconds and adjust */
  32.  
  33.